/*
 *
 *
 */

#ifndef GKT_TEXT_H
#define GKT_TEXT_H

#include "gkt_types.h"
#include "gkt_language.h"

#ifdef __cplusplus
extern "C" {
#endif

#define GKT_TEXT_ID_NONE	0
#define GKT_TEXT_ID_MASK	0xffff0000

#if defined(GKT_CONFIG_SCREEN_ENABLE) && GKT_CONFIG_SCREEN_ENABLE

enum {
	GKT_TEXT_ID_NECESSARY = 0,
	GKT_TEXT_ID_MAX,
	GKT_TEXT_ID_TYPE_MAX
};

void gkt_text_set_table(gkt_language_e language, 
			const char *const text_table[], 
			uint32_t table_size);

void gkt_text_set_id(uint32_t type, uint32_t id);

const char *gkt_text_get_ptr(uint32_t text_id);

#define GKT_TEXT(id_or_ptr)	\
	((GKT_TEXT_ID_MASK == ((uint32_t)(id_or_ptr) & GKT_TEXT_ID_MASK)) ? \
		gkt_text_get_ptr(id_or_ptr) : (const char *)(id_or_ptr))

#endif

#ifdef __cplusplus
}
#endif

#endif	/* GKT_TEXT_H */

